<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"  %>
<%String path=request.getContextPath(); %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>学生列表</title>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/jquery-easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="<%=path %>/js/jquery-easyui/themes/icon.css">
<script src="<%=path %>/js/jquery.min.js"></script>
<script src="<%=path %>/js/jquery-easyui/jquery.easyui.min.js"></script>
<script src="<%=path %>/js/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
<script src="<%=path %>/js/property.js"></script>
<script src="<%=path %>/js/jquery-easyui/student_says.js"></script>
<script>
$(function(){
	//setPagination("list");
/**	$(document).bind('contextmenu',function(e){	//给网页绑定右键菜单
		e.preventDefault();		//阻止浏览器的默认右键菜单
		$("#mm").menu('show',{
			left:e.pageX,	//鼠标右键的x坐标
			top:e.pageY		//鼠标右键的y坐标
		});
	});
*/
	function setPagination(tableid){
		var op=$("#"+tableid).datagrid("getPager");	//分页组件
		$(op).pagination({
			pageList:[10,15,20,25,30],
			beforePageText:"第",
			afterPageText:"页	共{pages}页",
			displayMsg:"当前显示{from}-{to}条记录 	共{total}条记录",
			onBeforRefresh:function(){
				$(this).pagination("loading");
				$(this).pagination("loaded");
			}
		});
	}
	
	$("#news").click(function(){
		$.messager.alert("提示","新建菜单","info");
	});
	
	$("#list").datagrid({
		onRowContextMenu:function(e,rowIndex,rowData){
			e.preventDefault();
			$("#mm").menu('show',{
				left:e.pageX,
				top:e.pageY	
			});
		}
	});
});
</script>
<style>
	body{margin:0px;padding:0px;}
	.okbutt{
		display:inline-block;
		height:30px;width:120px;
		border-radius:5px;
		background:#A8CD42;border:none;cursor:pointer;
		*border-bottom:none;
		color:#fff;
		font-size:17px;
		padding:0 10px;
		*width:170px;
		text-align:center;
		outline:none;
		font-family: "Microsoft Yahei",Arial, Helvetica, sans-serif;
		float:none;
		margin:5px;
	}
	input{
		width:200px;s
	}
</style>
</head>
<body>
	<table id="list" class="easyui-datagrid" toolbar="#kj" data-options="
		url:'<%=path %>/dtf/Says_selects',
		method:'post',
		rownumbers:true,	
		singleSelect:true,
		autoRowHeight:true,
		pagination:true,
		border:false,
		pageSize:10
	">
		<thead>
			<tr>
				<th field="sayid" checkbox="true" width="70">谈心编号</th>
				<th field="sayface">谈心对象</th>
				<th field="sayempid">策划人</th>
				<th field="sayscon">谈心内容</th>
				<th field="sayspro">谈心问题</th>
				<th field="sysback">学生反馈</th>
				
			</tr>
		</thead>
	</table>
	<div id="kj">
		<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add'" onclick="add();">添加</a>
		<!-- 链接按钮控件 -->
		<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-edit'" onclick="edit();">修改</a>
		<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove'" onclick="student3_removes();">移除</a>
	</div>
	<!-- 编辑 -->
	<div id="editWin" class="easyui-window" title="修改谈心信息" data-options="iconCls:'icon-edit', closable:true, closed:true"  style="width:500px;height:400px;padding:5px;text-align:center;">
		<form id="editform">
			<span>谈心编号：</span><input id="sayid" class="easyui-validatebox easyui-numberbox" readonly name="sayid" data-options="required:true" /><br /><br /><!-- 由dataoptions指定验证的规则 -->
			<span>谈心对象：</span><input id="sayface" class="easyui-validatebox easyui-numberbox"  name="sayface" data-options="required:true" /><br /><br /><!-- 由dataoptions指定验证的规则 -->
			<span>策划人：</span><input id="sayempid" class="easyui-validatebox easyui-numberbox"  name="sayempid" data-options="required:true" /><br /><br /><!-- 由dataoptions指定验证的规则 -->
			<span>谈心内容：</span><input id="sayscon" class="easyui-validatebox easyui-textbox"  name="sayscon" data-options="required:true" /><br /><br /><!-- 由dataoptions指定验证的规则 -->
			<span>谈心问题：</span><input id="sayspro" class="easyui-validatebox easyui-textbox"  name="sayspro" data-options="required:true" /><br /><br /><!-- 由dataoptions指定验证的规则 -->
			<span>学生反馈：</span><input id="sysback" class="easyui-validatebox easyui-textbox"  name="sysback" data-options="required:true" /><br /><br /><!-- 由dataoptions指定验证的规则 -->
			<input type="button" class="okbutt" onclick="student3_doedit();" value="确认" />
		</form>
	</div>
	<!-- 添加 -->
	<div id="addWin" class="easyui-window" title="添加谈心" data-options="iconCls:'icon-add', closable:true, closed:true"  style="width:500px;height:400px;padding:5px;text-align:center;">
		<form id="addform">
			<span>谈心对象：</span><input id="sayface" class="easyui-validatebox easyui-numberbox"  name="sayface" data-options="required:true" /><br /><br /><!-- 由dataoptions指定验证的规则 -->
			<span>策划人：</span><input id="sayempid" class="easyui-validatebox easyui-numberbox"  name="sayempid" data-options="required:true" /><br /><br /><!-- 由dataoptions指定验证的规则 -->
			<span>谈心内容：</span><input id="sayscon" class="easyui-validatebox easyui-textbox"  name="sayscon" data-options="required:true" /><br /><br /><!-- 由dataoptions指定验证的规则 -->
			<span>谈心问题：</span><input id="sayspro" class="easyui-validatebox easyui-textbox"  name="sayspro" data-options="required:true" /><br /><br /><!-- 由dataoptions指定验证的规则 -->
			<span>学生反馈：</span><input id="sysback" class="easyui-validatebox easyui-textbox"  name="sysback" data-options="required:true" /><br /><br /><!-- 由dataoptions指定验证的规则 -->
			<input type="button" class="okbutt" onclick="student3_doAdd();" value="确认"/>
		</form>
	</div>
	<div id="mm" class="easyui-menu" style="width:150px">
		<div data-options="name:'new',iconCls:'icon-add'" onclick="add();">添加</div>
		<div data-options="name:'edit',iconCls:'icon-edit'" onclick="edit();">编辑</div>
		<div data-options="name:'save',iconCls:'icon-save'" onclick="removes();">删除</div>
		<div data-options="name:'print',iconCls:'icon-print'">打印</div>
		<div class="menu-sep"></div>
		<div data-options="name:'exit'">退出</div>
	</div>
</body>
</html>